package com.hbnu.exercise.design;

public class Person
{
    public int id;
    public String userName;
    public String address;
    @Override
    public boolean equals(Object obj)
    {
        if (obj == null)
            return false;

        if (this == obj)
            return true;

        if (!(obj instanceof Person))
            return false;

        Person person = (Person) obj;

        return this.id == person.id && this.userName.equals(person.userName) && this.address.equals(person.address);
    }

    @Override
    public String toString()
    {
        return "Person{" +
                "id=" + id +
                ", userName='" + userName + '\'' +
                ", address='" + address + '\'' +
                '}';
    }
}
